Optimal. Leaf size=36 \[ \frac{a \sec (c+d x)}{d}-\frac{a \tanh ^{-1}(\cos (c+d x))}{d}+\frac{b \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0803195, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {2838, 2622, 321, 207, 3767, 8} \[ \frac{a \sec (c+d x)}{d}-\frac{a \tanh ^{-1}(\cos (c+d x))}{d}+\frac{b \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2838
Rule 2622
Rule 321
Rule 207
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx &=a \int \csc (c+d x) \sec ^2(c+d x) \, dx+b \int \sec ^2(c+d x) \, dx\\ &=\frac{a \operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}-\frac{b \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=\frac{a \sec (c+d x)}{d}+\frac{b \tan (c+d x)}{d}+\frac{a \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{d}+\frac{a \sec (c+d x)}{d}+\frac{b \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0352965, size = 56, normalized size = 1.56 \[ \frac{a \sec (c+d x)}{d}+\frac{a \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{d}-\frac{a \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{d}+\frac{b \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.051, size = 47, normalized size = 1.3 \begin{align*}{\frac{a}{d\cos \left ( dx+c \right ) }}+{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{d}}+{\frac{b\tan \left ( dx+c \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01055, size = 65, normalized size = 1.81 \begin{align*} \frac{a{\left (\frac{2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 2 \, b \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.6692, size = 188, normalized size = 5.22 \begin{align*} -\frac{a \cos \left (d x + c\right ) \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - a \cos \left (d x + c\right ) \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 2 \, b \sin \left (d x + c\right ) - 2 \, a}{2 \, d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19199, size = 65, normalized size = 1.81 \begin{align*} \frac{a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - \frac{2 \,{\left (b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a\right )}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]